﻿'Required for SQL CLR
Imports System.Data.SqlClient
Imports System.Data.SqlTypes
'Required for Web Queries:
'Imports System.Net
'Required for writing to disk
Imports System.IO
Public Class CodePlex

    '##############################################################################################
    'Begin Export Table/Query
    '##############################################################################################

    'Change list
    '05/14/2012 change order of parameters to be consistent accross all methods.
    '05/14/2012 removed near-duplicate copy paste in favor of a few core functions.

#Region "Public CLRs"
    'HTML
    <Microsoft.SqlServer.Server.SqlProcedure()> _
    Public Shared Function CLR_ExportTableToHTML(ByVal TableName As SqlString, ByVal FilePath As SqlString, ByVal FileName As SqlString, ByVal IncludeHeaders As SqlInt32, ByVal Title As SqlString, ByVal Summary As SqlString, ByVal HTMLStyle As SqlInt32) As Integer
        Dim str As String = "SELECT * FROM {0}"
        str = String.Format(str, TableName)
        Return CLR_ExportQueryToHTML(str, FilePath, FileName, IncludeHeaders, Title, Summary, HTMLStyle)
    End Function
    <Microsoft.SqlServer.Server.SqlProcedure()> _
    Public Shared Function CLR_ExportQueryToHTML(ByVal QueryCommand As SqlString, ByVal FilePath As SqlString, ByVal FileName As SqlString, ByVal IncludeHeaders As SqlInt32, ByVal Title As SqlString, ByVal Summary As SqlString, ByVal HTMLStyle As SqlInt32) As Integer
        Dim str As String = "{0}"
        Dim _sFilePath As String = FormattedPath(FilePath.ToString.Trim)
        Dim _sFileName As String = FormattedFileName(FileName.ToString.Trim)
        Dim _sFileNameWithPath As String = _sFilePath & _sFileName
        'by using the context connection, we have access to whatever CTEs, tables, temp tables,table variables and even linked servers that the caller has access to!
        Dim MyConnection As New SqlConnection("context connection=true")

        Try
            str = String.Format(str, QueryCommand)
            MyConnection.Open()

            Dim myCommand As New SqlCommand(str, MyConnection)
            Dim myDataReader As SqlDataReader
            myDataReader = myCommand.ExecuteReader()
            Dim MyDataTable As New DataTable("Results")
            MyDataTable.Load(myDataReader)

            'NOW we can, in theory, do something with the DataTable.
            str = FormatDataTableAsHTML(MyDataTable, GetInteger(IncludeHeaders.Value), GetString(Title), GetString(Summary), GetInteger(HTMLStyle.Value))
            SaveTextToFile(_sFileNameWithPath, str)

            Return 0

        Catch sqlex As SqlException
            Throw New Exception("FileName: " & _sFileNameWithPath, sqlex)
            Return 1
        Catch ex As Exception
            Throw New Exception("FileName: " & _sFileNameWithPath, ex)
            Return 1
        End Try

    End Function

    'XML
    <Microsoft.SqlServer.Server.SqlProcedure()> _
    Public Shared Function CLR_ExportTableToXML(ByVal TableName As SqlString, ByVal FilePath As SqlString, ByVal FileName As SqlString) As Integer
        Dim str As String = "SELECT * FROM {0}"
        str = String.Format(str, TableName)
        Return CLR_ExportQueryToXML(str, FilePath, FileName)
     
    End Function
    <Microsoft.SqlServer.Server.SqlProcedure()> _
    Public Shared Function CLR_ExportQueryToXML(ByVal QueryCommand As SqlString, ByVal FilePath As SqlString, ByVal FileName As SqlString) As Integer
        Dim str As String = "{0}"
        Dim _sFilePath As String = FormattedPath(FilePath.ToString.Trim)
        Dim _sFileName As String = FormattedFileName(FileName.ToString.Trim)
        Dim _sFileNameWithPath As String = _sFilePath & _sFileName
        'by using the context connection, we have access to whatever CTEs, tables, temp tables,table variables and even linked servers that the caller has access to!
        Dim MyConnection As New SqlConnection("context connection=true")

        Try
            str = String.Format(str, QueryCommand)

            MyConnection.Open()

            Dim myCommand As New SqlCommand(str, MyConnection)
            Dim myDataReader As SqlDataReader
            myDataReader = myCommand.ExecuteReader()
            Dim MyDataTable As New DataTable("Results")
            MyDataTable.Load(myDataReader)

            'NOW we can, in theory, do something with the DataTable.
            MyDataTable.WriteXml(_sFileNameWithPath)
            FilePath = "Created: " & _sFileNameWithPath
            Return 0

        Catch sqlex As SqlException
            Throw New Exception("FileName: " & _sFileNameWithPath, sqlex)
        Catch ex As Exception
            Throw New Exception("FileName: " & _sFileNameWithPath, ex)
        End Try

        Return 1
    End Function

    'Core Delimited Function that all the other methods use.
    <Microsoft.SqlServer.Server.SqlProcedure()> _
    Public Shared Function CLR_ExportToCustomDelim(ByVal QueryCommand As SqlString, ByVal FilePath As SqlString, ByVal FileName As SqlString, ByVal IncludeHeaders As SqlInt32, ByVal CustomDelimiter As SqlString, ByVal CustomRowDelimiter As SqlString, ByVal OverWriteExistingFlag As SqlInt32) As Integer
        Dim str As String = "{0}"
        Dim _sFilePath As String = FormattedPath(FilePath.ToString.Trim)
        Dim _sFileName As String = FormattedFileName(FileName.ToString.Trim)
        Dim _sFileNameWithPath As String = _sFilePath & _sFileName
        'by using the context connection, we have access to whatever CTEs, tables, temp tables,table variables and even linked servers that the caller has access to!
        Dim MyConnection As New SqlConnection("context connection=true")

        Try
            str = String.Format(str, QueryCommand)

            MyConnection.Open()

            Dim myCommand As New SqlCommand(str, MyConnection)
            Dim myDataReader As SqlDataReader
            myDataReader = myCommand.ExecuteReader()
            Dim MyDataTable As New DataTable("Results")
            MyDataTable.Load(myDataReader)

            'NOW we can, in theory, do something with the DataTable.
            str = FormatDataTable(MyDataTable, CustomDelimiter.ToString, GetInteger(IncludeHeaders), False, vbCrLf)
            SaveTextToFile(_sFileNameWithPath, str, , OverWriteExistingFlag)

            FilePath = "Created: " & _sFileNameWithPath
            Return 0

        Catch sqlex As SqlException
            Throw New Exception("FileName: " & _sFileNameWithPath, sqlex)
        Catch ex As Exception
            Throw New Exception("FileName: " & _sFileNameWithPath, ex)
        End Try

        Return 1
    End Function

    'Table
    <Microsoft.SqlServer.Server.SqlProcedure()> _
    Public Shared Function CLR_ExportTableToCSV(ByVal TableName As SqlString, ByVal FilePath As SqlString, ByVal FileName As SqlString, ByVal IncludeHeaders As SqlInt32, ByVal OverWriteExistingFlag As SqlInt32) As Integer
        Dim str As String = "SELECT * FROM {0}"
        str = String.Format(str, TableName)
        Return CLR_ExportToCustomDelim(str, FilePath, FileName, IncludeHeaders, ",", vbCrLf, True)
    End Function
    <Microsoft.SqlServer.Server.SqlProcedure()> _
    Public Shared Function CLR_ExportTableToTSV(ByVal TableName As SqlString, ByVal FilePath As SqlString, ByVal FileName As SqlString, ByVal IncludeHeaders As SqlInt32, ByVal OverWriteExistingFlag As SqlInt32) As Integer
        Dim str As String = "SELECT * FROM {0}"
        str = String.Format(str, TableName)
        Return CLR_ExportToCustomDelim(str, FilePath, FileName, IncludeHeaders, ",", vbTab, True)
    End Function
    <Microsoft.SqlServer.Server.SqlProcedure()> _
    Public Shared Function CLR_ExportTableToCustomDelim(ByVal TableName As SqlString, ByVal FilePath As SqlString, ByVal FileName As SqlString, ByVal IncludeHeaders As SqlInt32, ByVal CustomDelimiter As SqlString, ByVal OverWriteExistingFlag As SqlInt32) As Integer
        Dim str As String = "SELECT * FROM {0}"
        str = String.Format(str, TableName)
        Return CLR_ExportToCustomDelim(str, FilePath, FileName, IncludeHeaders, CustomDelimiter, vbCrLf, True)
    End Function
    'Query
    <Microsoft.SqlServer.Server.SqlProcedure()> _
    Public Shared Function CLR_ExportQueryToCSV(ByVal QueryCommand As SqlString, ByVal FilePath As SqlString, ByVal FileName As SqlString, ByVal IncludeHeaders As SqlInt32, ByVal OverWriteExistingFlag As SqlInt32) As Integer
        Dim str As String = "{0}"
        str = String.Format(str, QueryCommand)
        Return CLR_ExportToCustomDelim(str, FilePath, FileName, IncludeHeaders, ",", vbCrLf, True)
    End Function
    <Microsoft.SqlServer.Server.SqlProcedure()> _
    Public Shared Function CLR_ExportQueryToTSV(ByVal QueryCommand As SqlString, ByVal FilePath As SqlString, ByVal FileName As SqlString, ByVal IncludeHeaders As SqlInt32, ByVal OverWriteExistingFlag As SqlInt32) As Integer
        Dim str As String = "{0}"
        str = String.Format(str, QueryCommand)
        Return CLR_ExportToCustomDelim(str, FilePath, FileName, IncludeHeaders, vbTab, vbCrLf, True)
    End Function
    <Microsoft.SqlServer.Server.SqlProcedure()> _
    Public Shared Function CLR_ExportQueryToCustomDelim(ByVal QueryCommand As SqlString, ByVal FilePath As SqlString, ByVal FileName As SqlString, ByVal IncludeHeaders As SqlInt32, ByVal CustomDelimiter As SqlString, ByVal OverWriteExistingFlag As SqlInt32) As Integer
        Dim str As String = "{0}"
        str = String.Format(str, QueryCommand)
        Return CLR_ExportToCustomDelim(str, FilePath, FileName, IncludeHeaders, CustomDelimiter, vbCrLf, True)
    End Function
     'Fixed Width
    <Microsoft.SqlServer.Server.SqlProcedure()> _
    Public Shared Function CLR_ExportToFixedWidth(ByVal QueryCommand As SqlString, ByVal FilePath As SqlString, ByVal FileName As SqlString, ByVal IncludeHeaders As SqlInt32, ByVal OverWriteExistingFlag As SqlInt32) As Integer
        Dim str As String = "{0}"
        Dim _sFilePath As String = FormattedPath(FilePath.ToString.Trim)
        Dim _sFileName As String = FormattedFileName(FileName.ToString.Trim)
        Dim _sFileNameWithPath As String = _sFilePath & _sFileName

        Using MyConnection As New SqlConnection("context connection=true")
            Try
                str = String.Format(str, QueryCommand)
                MyConnection.Open()
                Using myCommand As New SqlCommand(str, MyConnection)
                    Using myDataReader As SqlDataReader = myCommand.ExecuteReader()
                        Using MyDataTable As New DataTable(QueryCommand.ToString)
                            MyDataTable.Load(myDataReader)
                            'NOW we can, in theory, do something with the DataTable.

                            str = FormatFixedWidthDataTable(MyDataTable, IncludeHeaders, False)
                            SaveTextToFile(_sFileNameWithPath, str, OverWriteExistingFlag)

                            FilePath = "Created: " & _sFileNameWithPath
                            Return 0
                        End Using
                    End Using
                End Using
            Catch sqlex As SqlException
                Throw New Exception("FileName: " & _sFileNameWithPath, sqlex)
            Catch ex As Exception
                Throw New Exception("FileName: " & _sFileNameWithPath, ex)
            End Try

            Return 1
        End Using
    End Function
    <Microsoft.SqlServer.Server.SqlProcedure()> _
    Public Shared Function CLR_ExportTableToFixedWidth(ByVal TableName As SqlString, ByVal FilePath As SqlString, ByVal FileName As SqlString, ByVal IncludeHeaders As SqlInt32, ByVal OverWriteExistingFlag As SqlInt32) As Integer
        Dim str As String = "SELECT * FROM {0}"
        str = String.Format(str, TableName)
        Return str = CLR_ExportToFixedWidth(str, FilePath, FileName, IncludeHeaders, True)
    End Function
    <Microsoft.SqlServer.Server.SqlProcedure()> _
    Public Shared Function CLR_ExportQueryToFixedWidth(ByVal QueryCommand As SqlString, ByVal FilePath As SqlString, ByVal FileName As SqlString, ByVal IncludeHeaders As SqlInt32, ByVal OverWriteExistingFlag As SqlInt32) As Integer
        Dim str As String = "{0}"
        str = String.Format(str, QueryCommand)
        Return str = CLR_ExportToFixedWidth(str, FilePath, FileName, IncludeHeaders, True)
    End Function
  


    'requires
    'Imports System.Net
    'Read webpage into SQL Server
    '<Microsoft.SqlServer.Server.SqlFunction()>
    'Public Shared Function CLR_WebQuery(ByVal URL As String) As SqlChars ' varchar(8000) = SqlString, SqlChars=varchar(max)
    '    Dim request As WebRequest = HttpWebRequest.Create(URL)
    '    Using response As WebResponse = request.GetResponse()
    '        Using dataStream As Stream = response.GetResponseStream()
    '            Using reader As New StreamReader(dataStream)
    '                Dim responseFromServer As String = reader.ReadToEnd()
    '                Return New SqlChars(New SqlString(responseFromServer))
    '            End Using
    '        End Using
    '    End Using
    '    request = Nothing
    'End Function


    '<Microsoft.SqlServer.Server.SqlProcedure()> _
    'Public Shared Function CLR_ExportTableToHTML(ByVal TableName As SqlString, ByVal FilePath As SqlString, ByVal FileName As SqlString) As Integer
    '    'The actual code for this uses DevExpress Controls, which requires a DevExpress license to compile. Not Quite working, but Stub Proc Left to Show there's more you can do!
    'End Function
    '<Microsoft.SqlServer.Server.SqlProcedure()> _
    'Public Shared Function CLR_ExportTableToMHT(ByVal TableName As SqlString, ByVal FilePath As SqlString, ByVal FileName As SqlString) As Integer
    '    'The actual code for this uses DevExpress Controls, which requires a DevExpress license to compile. Not Quite working, but Stub Proc Left to Show there's more you can do!
    'End Function
    '<Microsoft.SqlServer.Server.SqlProcedure()> _
    'Public Shared Function CLR_ExportTableToWord(ByVal TableName As SqlString, ByVal FilePath As SqlString, ByVal FileName As SqlString) As Integer
    '    'The actual code for this uses DevExpress Controls, which requires a DevExpress license to compile. Not Quite working, but Stub Proc Left to Show there's more you can do! 
    'End Function
    '<Microsoft.SqlServer.Server.SqlProcedure()> _
    'Public Shared Function CLR_ExportTableToRTF(ByVal TableName As SqlString, ByVal FilePath As SqlString, ByVal FileName As SqlString) As Integer
    '    'The actual code for this uses DevExpress Controls, which requires a DevExpress license to compile. Not Quite working, but Stub Proc Left to Show there's more you can do! 
    'End Function
    '<Microsoft.SqlServer.Server.SqlProcedure()> _
    'Public Shared Function CLR_ExportTableToPDF(ByVal TableName As SqlString, ByVal FilePath As SqlString, ByVal FileName As SqlString) As Integer
    '    'The actual code for this uses DevExpress Controls, which requires a DevExpress license to compile. Not Quite working, but Stub Proc Left to Show there's more you can do! 
    'End Function
    '<Microsoft.SqlServer.Server.SqlProcedure()> _
    'Public Shared Function CLR_ExportTableToXLS(ByVal TableName As SqlString, ByVal FilePath As SqlString, ByVal FileName As SqlString) As Integer
    '    'The actual code for this uses DevExpress Controls, which requires a DevExpress license to compile. Not Quite working, but Stub Proc Left to Show there's more you can do! 
    'End Function
    '<Microsoft.SqlServer.Server.SqlProcedure()> _
    'Public Shared Function CLR_ExportTableToXLSX(ByVal TableName As SqlString, ByVal FilePath As SqlString, ByVal FileName As SqlString) As Integer
    '    'The actual code for this uses DevExpress Controls, which requires a DevExpress license to compile. Not Quite working, but Stub Proc Left to Show there's more you can do! 
    'End Function
#End Region

#Region "Helper Friend Functions"
    'Functions used to make sure appending a path & filename together don't end up with missing or extra slashes
    Friend Shared Function FormattedPath(ByVal locFilePath As String) As String
        If Right(locFilePath, 1) = "\" Then
            locFilePath = locFilePath.ToString.Trim
        Else
            locFilePath = locFilePath.ToString.Trim & "\"
        End If
        Return locFilePath
    End Function
    Friend Shared Function FormattedFileName(ByVal locFileName As String) As String
        If Left(locFileName, 1) = "\" Then
            locFileName = locFileName.Substring(1, locFileName.Length - 1)
        Else
            locFileName = locFileName.ToString.Trim
        End If
        Return locFileName
    End Function

    'used to convert data to be printable
    Friend Shared Function GetInteger(ByVal objValue As Object) As Integer
        Try
            If objValue Is Nothing OrElse Convert.IsDBNull(objValue) OrElse IsNumeric(objValue) = False Then
                Return 0
            Else
                Return Convert.ToInt32(objValue)
            End If
        Catch ex As Exception
            Return 0
        End Try
        'OJO
        'If objValue Is Nothing OrElse Convert.IsDBNull(objValue) Then
        '  Return 0
        'Else
        '  Return Convert.ToInt64(objValue)
        'End If
    End Function
    Friend Shared Function GetString(ByVal objValue As Object) As String
        If objValue Is Nothing OrElse Convert.IsDBNull(objValue) Then
            Return ""
        Else
            Return Convert.ToString(objValue)
        End If
    End Function

    '35 styles of various CSS definitions to change the color of html reports
    Friend Shared Function GetHTMStyle(ByVal WhichStyle As String) As String
        Select Case WhichStyle
            Case "Caramel"
                Return GetHTMStyle(1)
            Case "Money Twins"
                Return GetHTMStyle(2)
            Case "Lilian"
                Return GetHTMStyle(3)
            Case "The Asphalt World"
                Return GetHTMStyle(4)
            Case "iMaginary"
                Return GetHTMStyle(5)
            Case "Black"
                Return GetHTMStyle(6)
            Case "Blue"
                Return GetHTMStyle(7)
            Case "Coffee"
                Return GetHTMStyle(8)
            Case "Liquid Sky"
                Return GetHTMStyle(9)
            Case "London Liquid Sky"
                Return GetHTMStyle(10)
            Case "Glass Oceans"
                Return GetHTMStyle(11)
            Case "Stardust"
                Return GetHTMStyle(12)
            Case "Xmas 2008 Blue"
                Return GetHTMStyle(13)
            Case "Valentine"
                Return GetHTMStyle(14)
            Case "McSkin"
                Return GetHTMStyle(15)
            Case "Summer 2008"
                Return GetHTMStyle(16)
            Case "Pumpkin"
                Return GetHTMStyle(17)
            Case "Dark Side"
                Return GetHTMStyle(18)
            Case "Springtime"
                Return GetHTMStyle(19)
            Case "Darkroom"
                Return GetHTMStyle(20)
            Case "Foggy"
                Return GetHTMStyle(21)
            Case "High Contrast"
                Return GetHTMStyle(22)
            Case "Seven"
                Return GetHTMStyle(23)
            Case "Seven Classic"
                Return GetHTMStyle(24)
            Case "Sharp"
                Return GetHTMStyle(25)
            Case "Sharp Plus"
                Return GetHTMStyle(26)
            Case "DevExpress Style"
                Return GetHTMStyle(27)
            Case "Office 2007 Blue"
                Return GetHTMStyle(28)
            Case "Office 2007 Black"
                Return GetHTMStyle(29)
            Case "Office 2007 Silver"
                Return GetHTMStyle(30)
            Case "Office 2007 Green"
                Return GetHTMStyle(31)
            Case "Office 2007 Pink"
                Return GetHTMStyle(32)
            Case "Office 2010 Blue"
                Return GetHTMStyle(33)
            Case "Office 2010 Black"
                Return GetHTMStyle(34)
            Case "Office 2010 Silver"
                Return GetHTMStyle(35)
            Case Else 'default = "London Liquid Sky"
                Return GetHTMStyle(10)
        End Select
    End Function
    Friend Shared Function GetHTMStyle(ByVal WhichStyle As Integer) As String
        Dim cssDefinition As String
        cssDefinition = "<style type=""text/css""> " & vbCrLf
        cssDefinition = cssDefinition & "       table {border-width:0px;empty-cells:show;width:90%;} " & vbCrLf
        cssDefinition = cssDefinition & "		tr  {vertical-align:top;} " & vbCrLf
        cssDefinition = cssDefinition & "		th  {vertical-align:top;font-weight:bold;} " & vbCrLf
        cssDefinition = cssDefinition & "		td  {vertical-align:top;} " & vbCrLf

        Select Case WhichStyle
            Case 1     'Caramel
                'Caramel.html " & vbCrLf

                cssDefinition = cssDefinition & "		.HeaderRow  {color:#000000;background-color:#C0C0C0;border-left:#808080 1px solid;border-top:#808080 1px solid;border-right:#808080 1px solid;border-bottom:#808080 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;} " & vbCrLf
                cssDefinition = cssDefinition & "		.EvenOverFlowRow  {color:#000000;background-color:#EBF5FA;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; } " & vbCrLf
                cssDefinition = cssDefinition & "		.EvenRow  {color:#000000;background-color:#EBF5FA;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;padding-right:1px;} " & vbCrLf
                cssDefinition = cssDefinition & "		.OddOverFlowRow  {color:#000000;background-color:#FAF2DF;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; } " & vbCrLf
                cssDefinition = cssDefinition & "		.OddRow  {color:#000000;background-color:#FAF2DF;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;padding-right:1px;} " & vbCrLf
                cssDefinition = cssDefinition & "		.csF7D3565D {height:0px;width:0px;overflow:hidden;font-size:0px;line-height:0px;} " & vbCrLf
                cssDefinition = cssDefinition & "	</style> " & vbCrLf
            Case 2     'Money Twins
                'Money Twins.html " & vbCrLf

                cssDefinition = cssDefinition & "		.HeaderRow  {color:#000000;background-color:#C0C0C0;border-left:#808080 1px solid;border-top:#808080 1px solid;border-right:#808080 1px solid;border-bottom:#808080 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;} " & vbCrLf
                cssDefinition = cssDefinition & "		.EvenOverFlowRow  {color:#000000;background-color:#EAF5F5;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; } " & vbCrLf
                cssDefinition = cssDefinition & "		.EvenRow  {color:#000000;background-color:#EAF5F5;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;padding-right:1px;} " & vbCrLf
                cssDefinition = cssDefinition & "		.OddOverFlowRow  {color:#000000;background-color:#FFF5D2;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; } " & vbCrLf
                cssDefinition = cssDefinition & "		.OddRow  {color:#000000;background-color:#FFF5D2;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;padding-right:1px;} " & vbCrLf
                cssDefinition = cssDefinition & "		.csF7D3565D {height:0px;width:0px;overflow:hidden;font-size:0px;line-height:0px;} " & vbCrLf
                cssDefinition = cssDefinition & "	</style> " & vbCrLf
            Case 3     'Lilian
                'Lilian.html " & vbCrLf

                cssDefinition = cssDefinition & "		.HeaderRow  {color:#000000;background-color:#C0C0C0;border-left:#808080 1px solid;border-top:#808080 1px solid;border-right:#808080 1px solid;border-bottom:#808080 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;} " & vbCrLf
                cssDefinition = cssDefinition & "		.OddOverFlowRow  {color:#000000;background-color:#EFF7FE;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; } " & vbCrLf
                cssDefinition = cssDefinition & "		.OddRow  {color:#000000;background-color:#EFF7FE;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;padding-right:1px;} " & vbCrLf
                cssDefinition = cssDefinition & "		.EvenOverFlowRow  {color:#000000;background-color:#F9F5F9;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; } " & vbCrLf
                cssDefinition = cssDefinition & "		.EvenRow  {color:#000000;background-color:#F9F5F9;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;padding-right:1px;} " & vbCrLf
                cssDefinition = cssDefinition & "		.csF7D3565D {height:0px;width:0px;overflow:hidden;font-size:0px;line-height:0px;} " & vbCrLf
                cssDefinition = cssDefinition & "	</style> " & vbCrLf
            Case 4     'The Asphalt World
                'The Asphalt World.html " & vbCrLf

                cssDefinition = cssDefinition & "		.HeaderRow  {color:#000000;background-color:#C0C0C0;border-left:#808080 1px solid;border-top:#808080 1px solid;border-right:#808080 1px solid;border-bottom:#808080 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;} " & vbCrLf
                cssDefinition = cssDefinition & "		.OddOverFlowRow  {color:#000000;background-color:#EFF7FE;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; } " & vbCrLf
                cssDefinition = cssDefinition & "		.OddRow  {color:#000000;background-color:#EFF7FE;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;padding-right:1px;} " & vbCrLf
                cssDefinition = cssDefinition & "		.EvenOverFlowRow  {color:#000000;background-color:#F8F8F8;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; } " & vbCrLf
                cssDefinition = cssDefinition & "		.EvenRow  {color:#000000;background-color:#F8F8F8;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;padding-right:1px;} " & vbCrLf
                cssDefinition = cssDefinition & "		.csF7D3565D {height:0px;width:0px;overflow:hidden;font-size:0px;line-height:0px;} " & vbCrLf
                cssDefinition = cssDefinition & "	</style> " & vbCrLf
            Case 5     'iMaginary
                'iMaginary.html " & vbCrLf

                cssDefinition = cssDefinition & "		.HeaderRow  {color:#000000;background-color:#C0C0C0;border-left:#808080 1px solid;border-top:#808080 1px solid;border-right:#808080 1px solid;border-bottom:#808080 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;} " & vbCrLf
                cssDefinition = cssDefinition & "		.OddOverFlowRow  {color:#000000;background-color:#E6F5FA;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; } " & vbCrLf
                cssDefinition = cssDefinition & "		.OddRow  {color:#000000;background-color:#E6F5FA;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;padding-right:1px;} " & vbCrLf
                cssDefinition = cssDefinition & "		.EvenOverFlowRow  {color:#000000;background-color:#EFFAE1;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; } " & vbCrLf
                cssDefinition = cssDefinition & "		.EvenRow  {color:#000000;background-color:#EFFAE1;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;padding-right:1px;} " & vbCrLf
                cssDefinition = cssDefinition & "		.csF7D3565D {height:0px;width:0px;overflow:hidden;font-size:0px;line-height:0px;} " & vbCrLf
                cssDefinition = cssDefinition & "	</style> " & vbCrLf
            Case 6     'Black
                'Black.html " & vbCrLf

                cssDefinition = cssDefinition & "		.HeaderRow  {color:#000000;background-color:#C0C0C0;border-left:#808080 1px solid;border-top:#808080 1px solid;border-right:#808080 1px solid;border-bottom:#808080 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;} " & vbCrLf
                cssDefinition = cssDefinition & "		.OddOverFlowRow  {color:#000000;background-color:#F5F5FD;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; } " & vbCrLf
                cssDefinition = cssDefinition & "		.OddRow  {color:#000000;background-color:#F5F5FD;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;padding-right:1px;} " & vbCrLf
                cssDefinition = cssDefinition & "		.EvenOverFlowRow  {color:#000000;background-color:#FFF7EC;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; } " & vbCrLf
                cssDefinition = cssDefinition & "		.EvenRow  {color:#000000;background-color:#FFF7EC;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;padding-right:1px;} " & vbCrLf
                cssDefinition = cssDefinition & "		.csF7D3565D {height:0px;width:0px;overflow:hidden;font-size:0px;line-height:0px;} " & vbCrLf
                cssDefinition = cssDefinition & "	</style> " & vbCrLf
            Case 7     'Blue
                'Blue.html " & vbCrLf

                cssDefinition = cssDefinition & "		.HeaderRow  {color:#000000;background-color:#C0C0C0;border-left:#808080 1px solid;border-top:#808080 1px solid;border-right:#808080 1px solid;border-bottom:#808080 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;} " & vbCrLf
                cssDefinition = cssDefinition & "		.OddOverFlowRow  {color:#000000;background-color:#F4F9FF;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; } " & vbCrLf
                cssDefinition = cssDefinition & "		.OddRow  {color:#000000;background-color:#F4F9FF;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;padding-right:1px;} " & vbCrLf
                cssDefinition = cssDefinition & "		.EvenOverFlowRow  {color:#000000;background-color:#FCF6FE;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; } " & vbCrLf
                cssDefinition = cssDefinition & "		.EvenRow  {color:#000000;background-color:#FCF6FE;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;padding-right:1px;} " & vbCrLf
                cssDefinition = cssDefinition & "		.csF7D3565D {height:0px;width:0px;overflow:hidden;font-size:0px;line-height:0px;} " & vbCrLf
                cssDefinition = cssDefinition & "	</style> " & vbCrLf
            Case 8     'Coffee
                'Coffee.html " & vbCrLf

                cssDefinition = cssDefinition & "		.HeaderRow  {color:#000000;background-color:#C0C0C0;border-left:#808080 1px solid;border-top:#808080 1px solid;border-right:#808080 1px solid;border-bottom:#808080 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;} " & vbCrLf
                cssDefinition = cssDefinition & "		.EvenOverFlowRow  {color:#000000;background-color:#E8E2D1;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; } " & vbCrLf
                cssDefinition = cssDefinition & "		.EvenRow  {color:#000000;background-color:#E8E2D1;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;padding-right:1px;} " & vbCrLf
                cssDefinition = cssDefinition & "		.OddOverFlowRow  {color:#000000;background-color:#F8F4E9;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; } " & vbCrLf
                cssDefinition = cssDefinition & "		.OddRow  {color:#000000;background-color:#F8F4E9;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;padding-right:1px;} " & vbCrLf
                cssDefinition = cssDefinition & "		.csF7D3565D {height:0px;width:0px;overflow:hidden;font-size:0px;line-height:0px;} " & vbCrLf
                cssDefinition = cssDefinition & "	</style> " & vbCrLf
            Case 9     'Liquid Sky
                'Liquid Sky.html " & vbCrLf

                cssDefinition = cssDefinition & "		.HeaderRow  {color:#000000;background-color:#C0C0C0;border-left:#808080 1px solid;border-top:#808080 1px solid;border-right:#808080 1px solid;border-bottom:#808080 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;} " & vbCrLf
                cssDefinition = cssDefinition & "		.OddOverFlowRow  {color:#000000;background-color:#FFFFFF;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; } " & vbCrLf
                cssDefinition = cssDefinition & "		.OddRow  {color:#000000;background-color:#FFFFFF;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;padding-right:1px;} " & vbCrLf
                cssDefinition = cssDefinition & "		.csF7D3565D {height:0px;width:0px;overflow:hidden;font-size:0px;line-height:0px;} " & vbCrLf
                cssDefinition = cssDefinition & "	</style> " & vbCrLf
            Case 10    'London Liquid Sky
                'London Liquid Sky.html " & vbCrLf

                cssDefinition = cssDefinition & "		.HeaderRow  {color:#000000;background-color:#C0C0C0;border-left:#808080 1px solid;border-top:#808080 1px solid;border-right:#808080 1px solid;border-bottom:#808080 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;} " & vbCrLf
                cssDefinition = cssDefinition & "		.OddOverFlowRow  {color:#000000;background-color:#FFFFFF;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; } " & vbCrLf
                cssDefinition = cssDefinition & "		.OddRow  {color:#000000;background-color:#FFFFFF;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;padding-right:1px;} " & vbCrLf
                cssDefinition = cssDefinition & "		.csF7D3565D {height:0px;width:0px;overflow:hidden;font-size:0px;line-height:0px;} " & vbCrLf
                cssDefinition = cssDefinition & "	</style> " & vbCrLf
            Case 11    'Glass Oceans
                'Glass Oceans.html " & vbCrLf

                cssDefinition = cssDefinition & "		.EvenOverFlowRow  {color:#000000;background-color:#9DDDFC;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; } " & vbCrLf
                cssDefinition = cssDefinition & "		.EvenRow  {color:#000000;background-color:#9DDDFC;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;padding-right:1px;} " & vbCrLf
                cssDefinition = cssDefinition & "		.HeaderRow  {color:#000000;background-color:#C0C0C0;border-left:#808080 1px solid;border-top:#808080 1px solid;border-right:#808080 1px solid;border-bottom:#808080 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;} " & vbCrLf
                cssDefinition = cssDefinition & "		.OddOverFlowRow  {color:#000000;background-color:#DDF4FF;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; } " & vbCrLf
                cssDefinition = cssDefinition & "		.OddRow  {color:#000000;background-color:#DDF4FF;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;padding-right:1px;} " & vbCrLf
                cssDefinition = cssDefinition & "		.csF7D3565D {height:0px;width:0px;overflow:hidden;font-size:0px;line-height:0px;} " & vbCrLf
                cssDefinition = cssDefinition & "	</style> " & vbCrLf
            Case 12    'Stardust
                'Stardust.html " & vbCrLf

                cssDefinition = cssDefinition & "		.HeaderRow  {color:#000000;background-color:#C0C0C0;border-left:#808080 1px solid;border-top:#808080 1px solid;border-right:#808080 1px solid;border-bottom:#808080 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;} " & vbCrLf
                cssDefinition = cssDefinition & "		.OddOverFlowRow  {color:#000000;background-color:#E8F3FE;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; } " & vbCrLf
                cssDefinition = cssDefinition & "		.OddRow  {color:#000000;background-color:#E8F3FE;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;padding-right:1px;} " & vbCrLf
                cssDefinition = cssDefinition & "		.EvenOverFlowRow  {color:#000000;background-color:#F2F5FA;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; } " & vbCrLf
                cssDefinition = cssDefinition & "		.EvenRow  {color:#000000;background-color:#F2F5FA;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;padding-right:1px;} " & vbCrLf
                cssDefinition = cssDefinition & "		.csF7D3565D {height:0px;width:0px;overflow:hidden;font-size:0px;line-height:0px;} " & vbCrLf
                cssDefinition = cssDefinition & "	</style> " & vbCrLf
            Case 13    'Xmas 2008 Blue
                'Xmas 2008 Blue.html " & vbCrLf

                cssDefinition = cssDefinition & "		.HeaderRow  {color:#000000;background-color:#C0C0C0;border-left:#808080 1px solid;border-top:#808080 1px solid;border-right:#808080 1px solid;border-bottom:#808080 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;} " & vbCrLf
                cssDefinition = cssDefinition & "		.EvenOverFlowRow  {color:#000000;background-color:#F2F8FF;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; } " & vbCrLf
                cssDefinition = cssDefinition & "		.EvenRow  {color:#000000;background-color:#F2F8FF;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;padding-right:1px;} " & vbCrLf
                cssDefinition = cssDefinition & "		.OddOverFlowRow  {color:#000000;background-color:#F7F3FF;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; } " & vbCrLf
                cssDefinition = cssDefinition & "		.OddRow  {color:#000000;background-color:#F7F3FF;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;padding-right:1px;} " & vbCrLf
                cssDefinition = cssDefinition & "		.csF7D3565D {height:0px;width:0px;overflow:hidden;font-size:0px;line-height:0px;} " & vbCrLf
                cssDefinition = cssDefinition & "	</style> " & vbCrLf
                cssDefinition = cssDefinition & " " & vbCrLf
            Case 14    'Valentine
                'Valentine.html " & vbCrLf

                cssDefinition = cssDefinition & "		.HeaderRow  {color:#000000;background-color:#C0C0C0;border-left:#808080 1px solid;border-top:#808080 1px solid;border-right:#808080 1px solid;border-bottom:#808080 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;} " & vbCrLf
                cssDefinition = cssDefinition & "		.OddOverFlowRow  {color:#000000;background-color:#F7F3FF;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; } " & vbCrLf
                cssDefinition = cssDefinition & "		.OddRow  {color:#000000;background-color:#F7F3FF;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;padding-right:1px;} " & vbCrLf
                cssDefinition = cssDefinition & "		.EvenOverFlowRow  {color:#000000;background-color:#FFF2F2;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; } " & vbCrLf
                cssDefinition = cssDefinition & "		.EvenRow  {color:#000000;background-color:#FFF2F2;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;padding-right:1px;} " & vbCrLf
                cssDefinition = cssDefinition & "		.csF7D3565D {height:0px;width:0px;overflow:hidden;font-size:0px;line-height:0px;} " & vbCrLf
                cssDefinition = cssDefinition & "	</style> " & vbCrLf
            Case 15    'McSkin
                'McSkin.html " & vbCrLf

                cssDefinition = cssDefinition & "		.HeaderRow  {color:#000000;background-color:#C0C0C0;border-left:#808080 1px solid;border-top:#808080 1px solid;border-right:#808080 1px solid;border-bottom:#808080 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;} " & vbCrLf
                cssDefinition = cssDefinition & "		.EvenOverFlowRow  {color:#000000;background-color:#EDF3FE;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; } " & vbCrLf
                cssDefinition = cssDefinition & "		.EvenRow  {color:#000000;background-color:#EDF3FE;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;padding-right:1px;} " & vbCrLf
                cssDefinition = cssDefinition & "		.OddOverFlowRow  {color:#000000;background-color:#F7F3FF;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; } " & vbCrLf
                cssDefinition = cssDefinition & "		.OddRow  {color:#000000;background-color:#F7F3FF;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;padding-right:1px;} " & vbCrLf
                cssDefinition = cssDefinition & "		.csF7D3565D {height:0px;width:0px;overflow:hidden;font-size:0px;line-height:0px;} " & vbCrLf
                cssDefinition = cssDefinition & "	</style> " & vbCrLf
            Case 16    'Summer 2008
                'Summer 2008.html " & vbCrLf

                cssDefinition = cssDefinition & "		.HeaderRow  {color:#000000;background-color:#C0C0C0;border-left:#808080 1px solid;border-top:#808080 1px solid;border-right:#808080 1px solid;border-bottom:#808080 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;} " & vbCrLf
                cssDefinition = cssDefinition & "		.EvenOverFlowRow  {color:#000000;background-color:#F2F8FF;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; } " & vbCrLf
                cssDefinition = cssDefinition & "		.EvenRow  {color:#000000;background-color:#F2F8FF;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;padding-right:1px;} " & vbCrLf
                cssDefinition = cssDefinition & "		.OddOverFlowRow  {color:#000000;background-color:#F7F3FF;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; } " & vbCrLf
                cssDefinition = cssDefinition & "		.OddRow  {color:#000000;background-color:#F7F3FF;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;padding-right:1px;} " & vbCrLf
                cssDefinition = cssDefinition & "		.csF7D3565D {height:0px;width:0px;overflow:hidden;font-size:0px;line-height:0px;} " & vbCrLf
                cssDefinition = cssDefinition & "	</style> " & vbCrLf
            Case 17    'Pumpkin
                'Pumpkin.html " & vbCrLf

                cssDefinition = cssDefinition & "		.EvenOverFlowRow  {color:#000000;background-color:#64646E;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; } " & vbCrLf
                cssDefinition = cssDefinition & "		.OddOverFlowRow  {color:#000000;background-color:#69646E;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; } " & vbCrLf
                cssDefinition = cssDefinition & "		.HeaderRow  {color:#000000;background-color:#C0C0C0;border-left:#808080 1px solid;border-top:#808080 1px solid;border-right:#808080 1px solid;border-bottom:#808080 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;} " & vbCrLf
                cssDefinition = cssDefinition & "		.EvenRow  {color:#FFFFFF;background-color:#64646E;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;padding-right:1px;} " & vbCrLf
                cssDefinition = cssDefinition & "		.OddRow  {color:#FFFFFF;background-color:#69646E;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;padding-right:1px;} " & vbCrLf
                cssDefinition = cssDefinition & "		.csF7D3565D {height:0px;width:0px;overflow:hidden;font-size:0px;line-height:0px;} " & vbCrLf
                cssDefinition = cssDefinition & "	</style> " & vbCrLf
            Case 18    'Dark Side
                'Dark Side.html " & vbCrLf

                cssDefinition = cssDefinition & "		.EvenOverFlowRow  {color:#000000;background-color:#64646E;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; } " & vbCrLf
                cssDefinition = cssDefinition & "		.OddOverFlowRow  {color:#000000;background-color:#69646E;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; } " & vbCrLf
                cssDefinition = cssDefinition & "		.HeaderRow  {color:#000000;background-color:#C0C0C0;border-left:#808080 1px solid;border-top:#808080 1px solid;border-right:#808080 1px solid;border-bottom:#808080 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;} " & vbCrLf
                cssDefinition = cssDefinition & "		.EvenRow  {color:#FFFFFF;background-color:#64646E;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;padding-right:1px;} " & vbCrLf
                cssDefinition = cssDefinition & "		.OddRow  {color:#FFFFFF;background-color:#69646E;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;padding-right:1px;} " & vbCrLf
                cssDefinition = cssDefinition & "		.csF7D3565D {height:0px;width:0px;overflow:hidden;font-size:0px;line-height:0px;} " & vbCrLf
                cssDefinition = cssDefinition & "	</style> " & vbCrLf
            Case 19    'Springtime
                cssDefinition = cssDefinition & "	</style> " & vbCrLf
                'Springtime.html " & vbCrLf

                cssDefinition = cssDefinition & "		.HeaderRow  {color:#000000;background-color:#C0C0C0;border-left:#808080 1px solid;border-top:#808080 1px solid;border-right:#808080 1px solid;border-bottom:#808080 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;} " & vbCrLf
                cssDefinition = cssDefinition & "		.EvenOverFlowRow  {color:#000000;background-color:#F2F8FF;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; } " & vbCrLf
                cssDefinition = cssDefinition & "		.EvenRow  {color:#000000;background-color:#F2F8FF;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;padding-right:1px;} " & vbCrLf
                cssDefinition = cssDefinition & "		.OddOverFlowRow  {color:#000000;background-color:#F7F3FF;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; } " & vbCrLf
                cssDefinition = cssDefinition & "		.OddRow  {color:#000000;background-color:#F7F3FF;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;padding-right:1px;} " & vbCrLf
                cssDefinition = cssDefinition & "		.csF7D3565D {height:0px;width:0px;overflow:hidden;font-size:0px;line-height:0px;} " & vbCrLf
                cssDefinition = cssDefinition & "	</style> " & vbCrLf
            Case 20    'Darkroom
                'Darkroom.html " & vbCrLf

                cssDefinition = cssDefinition & "		.EvenOverFlowRow  {color:#000000;background-color:#414146;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; } " & vbCrLf
                cssDefinition = cssDefinition & "		.OddOverFlowRow  {color:#000000;background-color:#464146;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; } " & vbCrLf
                cssDefinition = cssDefinition & "		.HeaderRow  {color:#000000;background-color:#C0C0C0;border-left:#808080 1px solid;border-top:#808080 1px solid;border-right:#808080 1px solid;border-bottom:#808080 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;} " & vbCrLf
                cssDefinition = cssDefinition & "		.EvenRow  {color:#B4B4B4;background-color:#414146;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;padding-right:1px;} " & vbCrLf
                cssDefinition = cssDefinition & "		.OddRow  {color:#B4B4B4;background-color:#464146;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;padding-right:1px;} " & vbCrLf
                cssDefinition = cssDefinition & "		.csF7D3565D {height:0px;width:0px;overflow:hidden;font-size:0px;line-height:0px;} " & vbCrLf
                cssDefinition = cssDefinition & "	</style> " & vbCrLf
            Case 21    'Foggy
                'Foggy.html " & vbCrLf

                cssDefinition = cssDefinition & "		.HeaderRow  {color:#000000;background-color:#C0C0C0;border-left:#808080 1px solid;border-top:#808080 1px solid;border-right:#808080 1px solid;border-bottom:#808080 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;} " & vbCrLf
                cssDefinition = cssDefinition & "		.EvenOverFlowRow  {color:#000000;background-color:#EBF2FA;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; } " & vbCrLf
                cssDefinition = cssDefinition & "		.OddOverFlowRow  {color:#000000;background-color:#FAF5FF;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; } " & vbCrLf
                cssDefinition = cssDefinition & "		.EvenRow  {color:#2A2C36;background-color:#EBF2FA;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;padding-right:1px;} " & vbCrLf
                cssDefinition = cssDefinition & "		.OddRow  {color:#2A2C36;background-color:#FAF5FF;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;padding-right:1px;} " & vbCrLf
                cssDefinition = cssDefinition & "		.csF7D3565D {height:0px;width:0px;overflow:hidden;font-size:0px;line-height:0px;} " & vbCrLf
                cssDefinition = cssDefinition & "	</style> " & vbCrLf
            Case 22    'High Contrast
                'High Contrast.html " & vbCrLf

                cssDefinition = cssDefinition & "		.EvenOverFlowRow  {color:#000000;background-color:#404040;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; } " & vbCrLf
                cssDefinition = cssDefinition & "		.OddOverFlowRow  {color:#000000;background-color:#4A4A4A;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; } " & vbCrLf
                cssDefinition = cssDefinition & "		.HeaderRow  {color:#000000;background-color:#C0C0C0;border-left:#808080 1px solid;border-top:#808080 1px solid;border-right:#808080 1px solid;border-bottom:#808080 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;} " & vbCrLf
                cssDefinition = cssDefinition & "		.EvenRow  {color:#FFFFFF;background-color:#404040;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;padding-right:1px;} " & vbCrLf
                cssDefinition = cssDefinition & "		.OddRow  {color:#FFFFFF;background-color:#4A4A4A;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;padding-right:1px;} " & vbCrLf
                cssDefinition = cssDefinition & "		.csF7D3565D {height:0px;width:0px;overflow:hidden;font-size:0px;line-height:0px;} " & vbCrLf
                cssDefinition = cssDefinition & "	</style> " & vbCrLf
            Case 23    'Seven
                'Seven.html " & vbCrLf

                cssDefinition = cssDefinition & "		.HeaderRow  {color:#000000;background-color:#C0C0C0;border-left:#808080 1px solid;border-top:#808080 1px solid;border-right:#808080 1px solid;border-bottom:#808080 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;} " & vbCrLf
                cssDefinition = cssDefinition & "		.EvenOverFlowRow  {color:#000000;background-color:#F2F8FF;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; } " & vbCrLf
                cssDefinition = cssDefinition & "		.EvenRow  {color:#000000;background-color:#F2F8FF;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;padding-right:1px;} " & vbCrLf
                cssDefinition = cssDefinition & "		.OddOverFlowRow  {color:#000000;background-color:#F7F6FF;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; } " & vbCrLf
                cssDefinition = cssDefinition & "		.OddRow  {color:#000000;background-color:#F7F6FF;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;padding-right:1px;} " & vbCrLf
                cssDefinition = cssDefinition & "		.csF7D3565D {height:0px;width:0px;overflow:hidden;font-size:0px;line-height:0px;} " & vbCrLf
                cssDefinition = cssDefinition & "	</style> " & vbCrLf
            Case 24    'Seven Classic
                'Seven Classic.html " & vbCrLf

                cssDefinition = cssDefinition & "		.HeaderRow  {color:#000000;background-color:#C0C0C0;border-left:#808080 1px solid;border-top:#808080 1px solid;border-right:#808080 1px solid;border-bottom:#808080 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;} " & vbCrLf
                cssDefinition = cssDefinition & "		.EvenOverFlowRow  {color:#000000;background-color:#F2F8FF;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; } " & vbCrLf
                cssDefinition = cssDefinition & "		.EvenRow  {color:#000000;background-color:#F2F8FF;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;padding-right:1px;} " & vbCrLf
                cssDefinition = cssDefinition & "		.OddOverFlowRow  {color:#000000;background-color:#F7F6FF;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; } " & vbCrLf
                cssDefinition = cssDefinition & "		.OddRow  {color:#000000;background-color:#F7F6FF;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;padding-right:1px;} " & vbCrLf
                cssDefinition = cssDefinition & "		.csF7D3565D {height:0px;width:0px;overflow:hidden;font-size:0px;line-height:0px;} " & vbCrLf
                cssDefinition = cssDefinition & "	</style> " & vbCrLf
            Case 25    'Sharp
                'Sharp.html " & vbCrLf

                cssDefinition = cssDefinition & "		.HeaderRow  {color:#000000;background-color:#C0C0C0;border-left:#808080 1px solid;border-top:#808080 1px solid;border-right:#808080 1px solid;border-bottom:#808080 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;} " & vbCrLf
                cssDefinition = cssDefinition & "		.EvenOverFlowRow  {color:#000000;background-color:#EBF5FF;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; } " & vbCrLf
                cssDefinition = cssDefinition & "		.OddOverFlowRow  {color:#000000;background-color:#FFF2FD;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; } " & vbCrLf
                cssDefinition = cssDefinition & "		.EvenRow  {color:#2A2C36;background-color:#EBF5FF;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;padding-right:1px;} " & vbCrLf
                cssDefinition = cssDefinition & "		.OddRow  {color:#2A2C36;background-color:#FFF2FD;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;padding-right:1px;} " & vbCrLf
                cssDefinition = cssDefinition & "		.csF7D3565D {height:0px;width:0px;overflow:hidden;font-size:0px;line-height:0px;} " & vbCrLf
                cssDefinition = cssDefinition & "	</style> " & vbCrLf
            Case 26    'Sharp Plus
                'Sharp Plus.html " & vbCrLf

                cssDefinition = cssDefinition & "		.OddOverFlowRow  {color:#000000;background-color:#454758;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; } " & vbCrLf
                cssDefinition = cssDefinition & "		.EvenOverFlowRow  {color:#000000;background-color:#494557;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; } " & vbCrLf
                cssDefinition = cssDefinition & "		.HeaderRow  {color:#000000;background-color:#C0C0C0;border-left:#808080 1px solid;border-top:#808080 1px solid;border-right:#808080 1px solid;border-bottom:#808080 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;} " & vbCrLf
                cssDefinition = cssDefinition & "		.OddRow  {color:#E6E8F2;background-color:#454758;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;padding-right:1px;} " & vbCrLf
                cssDefinition = cssDefinition & "		.EvenRow  {color:#E6E8F2;background-color:#494557;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;padding-right:1px;} " & vbCrLf
                cssDefinition = cssDefinition & "		.csF7D3565D {height:0px;width:0px;overflow:hidden;font-size:0px;line-height:0px;} " & vbCrLf
                cssDefinition = cssDefinition & "	</style> " & vbCrLf
            Case 27    'DevExpress Style
                'DevExpress Style.html " & vbCrLf

                cssDefinition = cssDefinition & "		.HeaderRow  {color:#000000;background-color:#C0C0C0;border-left:#808080 1px solid;border-top:#808080 1px solid;border-right:#808080 1px solid;border-bottom:#808080 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;} " & vbCrLf
                cssDefinition = cssDefinition & "		.EvenOverFlowRow  {color:#000000;background-color:#F2F6FB;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; } " & vbCrLf
                cssDefinition = cssDefinition & "		.OddOverFlowRow  {color:#000000;background-color:#F7F4FD;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; } " & vbCrLf
                cssDefinition = cssDefinition & "		.EvenRow  {color:#201F35;background-color:#F2F6FB;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;padding-right:1px;} " & vbCrLf
                cssDefinition = cssDefinition & "		.OddRow  {color:#201F35;background-color:#F7F4FD;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;padding-right:1px;} " & vbCrLf
                cssDefinition = cssDefinition & "		.csF7D3565D {height:0px;width:0px;overflow:hidden;font-size:0px;line-height:0px;} " & vbCrLf
                cssDefinition = cssDefinition & "	</style> " & vbCrLf
            Case 28    'Office 2007 Blue
                'Office 2007 Blue.html " & vbCrLf

                cssDefinition = cssDefinition & "		.HeaderRow  {color:#000000;background-color:#C0C0C0;border-left:#808080 1px solid;border-top:#808080 1px solid;border-right:#808080 1px solid;border-bottom:#808080 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;} " & vbCrLf
                cssDefinition = cssDefinition & "		.EvenOverFlowRow  {color:#000000;background-color:#F5FBFF;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; } " & vbCrLf
                cssDefinition = cssDefinition & "		.EvenRow  {color:#000000;background-color:#F5FBFF;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;padding-right:1px;} " & vbCrLf
                cssDefinition = cssDefinition & "		.OddOverFlowRow  {color:#000000;background-color:#F5FCF4;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; } " & vbCrLf
                cssDefinition = cssDefinition & "		.OddRow  {color:#000000;background-color:#F5FCF4;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;padding-right:1px;} " & vbCrLf
                cssDefinition = cssDefinition & "		.csF7D3565D {height:0px;width:0px;overflow:hidden;font-size:0px;line-height:0px;} " & vbCrLf
                cssDefinition = cssDefinition & "	</style> " & vbCrLf
            Case 29    'Office 2007 Black
                'Office 2007 Black.html " & vbCrLf

                cssDefinition = cssDefinition & "		.HeaderRow  {color:#000000;background-color:#C0C0C0;border-left:#808080 1px solid;border-top:#808080 1px solid;border-right:#808080 1px solid;border-bottom:#808080 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;} " & vbCrLf
                cssDefinition = cssDefinition & "		.EvenOverFlowRow  {color:#000000;background-color:#F2F8FF;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; } " & vbCrLf
                cssDefinition = cssDefinition & "		.EvenRow  {color:#000000;background-color:#F2F8FF;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;padding-right:1px;} " & vbCrLf
                cssDefinition = cssDefinition & "		.OddOverFlowRow  {color:#000000;background-color:#F5FCF4;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; } " & vbCrLf
                cssDefinition = cssDefinition & "		.OddRow  {color:#000000;background-color:#F5FCF4;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;padding-right:1px;} " & vbCrLf
                cssDefinition = cssDefinition & "		.csF7D3565D {height:0px;width:0px;overflow:hidden;font-size:0px;line-height:0px;} " & vbCrLf
                cssDefinition = cssDefinition & "	</style> " & vbCrLf
            Case 30    'Office 2007 Silver
                'Office 2007 Silver.html " & vbCrLf

                cssDefinition = cssDefinition & "		.HeaderRow  {color:#000000;background-color:#C0C0C0;border-left:#808080 1px solid;border-top:#808080 1px solid;border-right:#808080 1px solid;border-bottom:#808080 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;} " & vbCrLf
                cssDefinition = cssDefinition & "		.EvenOverFlowRow  {color:#000000;background-color:#F2F8FF;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; } " & vbCrLf
                cssDefinition = cssDefinition & "		.EvenRow  {color:#000000;background-color:#F2F8FF;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;padding-right:1px;} " & vbCrLf
                cssDefinition = cssDefinition & "		.OddOverFlowRow  {color:#000000;background-color:#F5FCF4;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; } " & vbCrLf
                cssDefinition = cssDefinition & "		.OddRow  {color:#000000;background-color:#F5FCF4;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;padding-right:1px;} " & vbCrLf
                cssDefinition = cssDefinition & "		.csF7D3565D {height:0px;width:0px;overflow:hidden;font-size:0px;line-height:0px;} " & vbCrLf
                cssDefinition = cssDefinition & "	</style> " & vbCrLf
            Case 31    'Office 2007 Green
                'Office 2007 Green.html " & vbCrLf

                cssDefinition = cssDefinition & "		.HeaderRow  {color:#000000;background-color:#C0C0C0;border-left:#808080 1px solid;border-top:#808080 1px solid;border-right:#808080 1px solid;border-bottom:#808080 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;} " & vbCrLf
                cssDefinition = cssDefinition & "		.EvenOverFlowRow  {color:#000000;background-color:#F2F8FF;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; } " & vbCrLf
                cssDefinition = cssDefinition & "		.EvenRow  {color:#000000;background-color:#F2F8FF;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;padding-right:1px;} " & vbCrLf
                cssDefinition = cssDefinition & "		.OddOverFlowRow  {color:#000000;background-color:#F5FCF4;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; } " & vbCrLf
                cssDefinition = cssDefinition & "		.OddRow  {color:#000000;background-color:#F5FCF4;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;padding-right:1px;} " & vbCrLf
                cssDefinition = cssDefinition & "		.csF7D3565D {height:0px;width:0px;overflow:hidden;font-size:0px;line-height:0px;} " & vbCrLf
                cssDefinition = cssDefinition & "	</style> " & vbCrLf
            Case 32    'Office 2007 Pink
                'Office 2007 Pink.html " & vbCrLf

                cssDefinition = cssDefinition & "		.HeaderRow  {color:#000000;background-color:#C0C0C0;border-left:#808080 1px solid;border-top:#808080 1px solid;border-right:#808080 1px solid;border-bottom:#808080 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;} " & vbCrLf
                cssDefinition = cssDefinition & "		.OddOverFlowRow  {color:#000000;background-color:#F0F6FA;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; } " & vbCrLf
                cssDefinition = cssDefinition & "		.OddRow  {color:#000000;background-color:#F0F6FA;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;padding-right:1px;} " & vbCrLf
                cssDefinition = cssDefinition & "		.EvenOverFlowRow  {color:#000000;background-color:#F9F4F6;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; } " & vbCrLf
                cssDefinition = cssDefinition & "		.EvenRow  {color:#000000;background-color:#F9F4F6;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;padding-right:1px;} " & vbCrLf
                cssDefinition = cssDefinition & "		.csF7D3565D {height:0px;width:0px;overflow:hidden;font-size:0px;line-height:0px;} " & vbCrLf
                cssDefinition = cssDefinition & "	</style> " & vbCrLf
            Case 33    'Office 2010 Blue
                'Office 2010 Blue.html " & vbCrLf

                cssDefinition = cssDefinition & "		.HeaderRow  {color:#000000;background-color:#C0C0C0;border-left:#808080 1px solid;border-top:#808080 1px solid;border-right:#808080 1px solid;border-bottom:#808080 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;} " & vbCrLf
                cssDefinition = cssDefinition & "		.EvenOverFlowRow  {color:#000000;background-color:#F2F6FB;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; } " & vbCrLf
                cssDefinition = cssDefinition & "		.EvenRow  {color:#000000;background-color:#F2F6FB;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;padding-right:1px;} " & vbCrLf
                cssDefinition = cssDefinition & "		.OddOverFlowRow  {color:#000000;background-color:#FBFBF3;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; } " & vbCrLf
                cssDefinition = cssDefinition & "		.OddRow  {color:#000000;background-color:#FBFBF3;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;padding-right:1px;} " & vbCrLf
                cssDefinition = cssDefinition & "		.csF7D3565D {height:0px;width:0px;overflow:hidden;font-size:0px;line-height:0px;} " & vbCrLf
                cssDefinition = cssDefinition & "	</style> " & vbCrLf
            Case 34    'Office 2010 Black
                'Office 2010 Black.html " & vbCrLf

                cssDefinition = cssDefinition & "		.HeaderRow  {color:#000000;background-color:#C0C0C0;border-left:#808080 1px solid;border-top:#808080 1px solid;border-right:#808080 1px solid;border-bottom:#808080 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;} " & vbCrLf
                cssDefinition = cssDefinition & "		.EvenOverFlowRow  {color:#000000;background-color:#F2F6FB;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; } " & vbCrLf
                cssDefinition = cssDefinition & "		.OddOverFlowRow  {color:#000000;background-color:#FBFBF3;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; } " & vbCrLf
                cssDefinition = cssDefinition & "		.EvenRow  {color:#3C3C3C;background-color:#F2F6FB;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;padding-right:1px;} " & vbCrLf
                cssDefinition = cssDefinition & "		.OddRow  {color:#3C3C3C;background-color:#FBFBF3;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;padding-right:1px;} " & vbCrLf
                cssDefinition = cssDefinition & "		.csF7D3565D {height:0px;width:0px;overflow:hidden;font-size:0px;line-height:0px;} " & vbCrLf
                cssDefinition = cssDefinition & "	</style> " & vbCrLf
            Case 35    'Office 2010 Silver
                'Office 2010 Silver.html " & vbCrLf

                cssDefinition = cssDefinition & "		.HeaderRow  {color:#000000;background-color:#C0C0C0;border-left:#808080 1px solid;border-top:#808080 1px solid;border-right:#808080 1px solid;border-bottom:#808080 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;} " & vbCrLf
                cssDefinition = cssDefinition & "		.EvenOverFlowRow  {color:#000000;background-color:#F2F6FB;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; } " & vbCrLf
                cssDefinition = cssDefinition & "		.EvenRow  {color:#000000;background-color:#F2F6FB;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;padding-right:1px;} " & vbCrLf
                cssDefinition = cssDefinition & "		.OddOverFlowRow  {color:#000000;background-color:#FBFBF3;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; } " & vbCrLf
                cssDefinition = cssDefinition & "		.OddRow  {color:#000000;background-color:#FBFBF3;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;padding-right:1px;} " & vbCrLf
                cssDefinition = cssDefinition & "		.csF7D3565D {height:0px;width:0px;overflow:hidden;font-size:0px;line-height:0px;} " & vbCrLf
                cssDefinition = cssDefinition & "	</style> " & vbCrLf
            Case Else ' my default is 10    'London Liquid Sky
                'London Liquid Sky.html " & vbCrLf

                cssDefinition = cssDefinition & "		.HeaderRow  {color:#000000;background-color:#C0C0C0;border-left:#808080 1px solid;border-top:#808080 1px solid;border-right:#808080 1px solid;border-bottom:#808080 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;} " & vbCrLf
                cssDefinition = cssDefinition & "		.OddOverFlowRow  {color:#000000;background-color:#FFFFFF;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; } " & vbCrLf
                cssDefinition = cssDefinition & "		.OddRow  {color:#000000;background-color:#FFFFFF;border-left:#A9A9A9 1px solid;border-top:#A9A9A9 1px solid;border-right:#A9A9A9 1px solid;border-bottom:#A9A9A9 1px solid;font-family:Tahoma; font-size:8pt; font-weight:normal; font-style:normal; padding-left:2px;padding-right:1px;} " & vbCrLf
                cssDefinition = cssDefinition & "		.csF7D3565D {height:0px;width:0px;overflow:hidden;font-size:0px;line-height:0px;} " & vbCrLf
                cssDefinition = cssDefinition & "	</style> " & vbCrLf
        End Select
        Return cssDefinition
    End Function

    'padding functions used for fixed width
    Friend Shared Function RPad(ByRef val As String, ByVal maxsize As Integer) As String
        Dim x As String
        If maxsize >= Len(val) Then
            x = val & Space(maxsize - Len(val)) '--value plus a number of spaces
        Else
            x = val
        End If

        Return x
    End Function
    Friend Shared Function LPad(ByRef val As String, ByVal maxsize As Integer) As String
        Dim x As String
        If maxsize >= Len(val) Then
            x = Space(maxsize - Len(val)) & val  '--value plus a number of spaces
        Else
            x = val
        End If

        Return x
    End Function
#End Region

#Region "DataTable Friend Functions"
    'changes a datatable into a string for printing
    Friend Shared Function FormatDataTable(ByRef dt As DataTable, ByVal Delimiter As String, ByVal IncludeHeaders As SqlInt32, ByVal WithQuotedIdentifiers As Boolean, ByVal RowDelimiter As String) As String
        Dim results As String = ""
        'headers:
        For Each col As DataColumn In dt.Columns
            results = results & col.ColumnName & Delimiter
        Next
        'trailing delimiter should be removed
        Try
            results = Microsoft.VisualBasic.Left(results, Len(results) - Len(Delimiter))
        Catch ex As Exception

        End Try

        'add the row delimiter instead of vbCrLf
        results = results & RowDelimiter
        '--now spew the results
        For Each dr As DataRow In dt.Rows
            For Each col As DataColumn In dt.Columns
                results = results & """" & GetString(dr(col)) & """" & Delimiter
            Next
            'trailing delimiter should be removed
            Try
                results = Microsoft.VisualBasic.Left(results, Len(results) - Len(Delimiter))
            Catch ex As Exception

            End Try

            'add the row delimiter instead of vbCrLf
            results = results & RowDelimiter
        Next
        Return results
    End Function
    'changes a datatable into a formatted html document for printing
    Friend Shared Function FormatDataTableAsHTML(ByRef dt As DataTable, ByVal IncludeHeaders As Integer, ByVal Title As String, ByVal Summary As String, ByVal HTMLStyle As Integer) As String
        Dim results As String = ""
        Dim i As Integer
        'preformatting.
        results = "<!DOCTYPE HTML PUBLIC ""-//W3C//DTD HTML 4.0 Transitional//EN""> " & vbCrLf
        results = results & "<html> " & vbCrLf
        results = results & "<head> " & vbCrLf
        results = results & "<title> " & Title & " </title> " & vbCrLf
        results = results & "<meta HTTP-EQUIV=""Content-Type"" CONTENT=""text/html; charset=utf-8"">" & vbCrLf
        results = results & "<meta name=""Generator"" content=""CLR_ExportTableToHTML""> " & vbCrLf
        results = results & "<meta name=""Author"" content=""CLR_ExportTableToHTML""> " & vbCrLf
        results = results & "<meta name=""Keywords"" content=""CLR_ExportTableToHTML""> " & vbCrLf
        results = results & "<meta name=""Description"" content=""CLR_ExportTableToHTML""> " & vbCrLf
        results = results & GetHTMStyle(HTMLStyle) & " " & vbCrLf
        results = results & "</head> " & vbCrLf
        results = results & "<body> " & vbCrLf
        results = results & "<table summary=""" & Summary & """> " & vbCrLf
        results = results & "<caption>" & Summary & "</caption> " & vbCrLf

        If IncludeHeaders <> 0 Then
            'headers:
            results = results & "<tr> " & vbCrLf
            For Each col As DataColumn In dt.Columns
                results = results & "<th class=""HeaderRow""> " & col.ColumnName & "</th>" & vbCrLf
            Next
            results = results & "</tr> " & vbCrLf
        End If


        '--now spew the results
        i = 1
        If dt.Rows.Count = 0 Then
            results = results & "<tr><td colspan=""" & dt.Columns.Count & """>No Data Found.</td></tr> " & vbCrLf
        End If
        For Each dr As DataRow In dt.Rows
            results = results & "<tr> " & vbCrLf
            For Each col As DataColumn In dt.Columns
                If col.DataType.ToString = "System.Boolean" Then
                    If GetInteger(dr(col)) = 0 Then
                        results = results & "<td class=""" & IIf(i Mod 2 = 0, "EvenOverFlowRow", "OddOverFlowRow").ToString & """><input type=""checkbox"" DISABLED name=""" & col.ColumnName & i & """>&nbsp;</td>" & vbCrLf
                    Else
                        results = results & "<td class=""" & IIf(i Mod 2 = 0, "EvenOverFlowRow", "OddOverFlowRow").ToString & """><input type=""checkbox"" DISABLED CHECKED name=""" & col.ColumnName & i & """>&nbsp;</td>" & vbCrLf
                    End If
                Else
                    results = results & "<td class=""" & IIf(i Mod 2 = 0, "EvenRow", "OddRow").ToString & """> " & GetString(dr(col)).Replace(vbCrLf, "<br />") & vbCrLf & "&nbsp;</td>" & vbCrLf
                End If
            Next
            results = results & "</tr> " & vbCrLf
            i = i + 1
        Next
        results = results & " " & vbCrLf
        results = results & "</body> " & vbCrLf
        results = results & "</html> " & vbCrLf
        results = results & " " & vbCrLf
        Return results
    End Function
    'changes a datatable into a fixed width formatted string for printing;
    'note that the a varchar(max) column, which has no MaxLength will have the width defined as the  widest character in the data.
    'that means if i export different data, the fixed widths could be different.
    'the fix is to specifically cast/convert your data to a fixed size.
    Friend Shared Function FormatFixedWidthDataTable(ByRef dt As DataTable, ByVal IncludeHeaders As SqlInt32, ByVal RightAligned As Boolean) As String
        Dim results As String = ""
        '--initialize the length, stored in the  .Tag, to be at least as long as the ColumnName + 1 chars or the maxlength if defined.
        For Each col As DataColumn In dt.Columns
            If col.MaxLength > 0 Then
                col.Caption = col.MaxLength
                Continue For
            End If
            If GetInteger(col.Caption) < GetString(col.ColumnName).Length + 1 Then
                col.Caption = GetString(col.ColumnName).Length + 1
            End If
        Next
        '--no easy way to find the max(len()) of each column, iterate thru every damn row (RBAR!)
        For Each dr As DataRow In dt.Rows
            For Each col As DataColumn In dt.Columns
                If GetInteger(col.Caption) < GetString(dr(col)).Length + 1 Then
                    col.Caption = GetString(dr(col)).Length + 1
                End If
            Next
        Next
        '--now build our string
        'headers:
        For Each col As DataColumn In dt.Columns
            results = results & LPad(col.ColumnName, GetInteger(col.Caption))
        Next
        results = results & vbCrLf
        '--now spew the results
        For Each dr As DataRow In dt.Rows
            For Each col As DataColumn In dt.Columns
                If RightAligned Then
                    results = results & LPad(GetString(dr(col)), GetInteger(col.Caption))
                Else
                    results = results & RPad(GetString(dr(col)), GetInteger(col.Caption))
                End If

            Next
            results = results & vbCrLf
        Next
        Return results
    End Function

    Friend Shared Function GetFileContents(ByVal FullPath As String, _
                            Optional ByRef ErrInfo As String = "") As String

        Dim strContents As String
        Dim objReader As StreamReader
        Try
            objReader = New StreamReader(FullPath)
            strContents = objReader.ReadToEnd()
            objReader.Close()
            Return strContents
        Catch Ex As Exception
            ErrInfo = Ex.Message
            Return ""
        End Try
    End Function
    Friend Shared Function SaveTextToFile(ByVal FullPath As String, ByRef strData As String, _
                                   Optional ByVal ErrInfo As String = "", Optional OverWriteExistingFlag As Boolean = True) As Boolean
        Dim bAns As Boolean = False
        Dim objReader As StreamWriter
        Try
            If Not OverWriteExistingFlag Then Return AppendTextToFile(FullPath, strData, ErrInfo)
            objReader = New StreamWriter(FullPath)
            objReader.Write(strData)
            objReader.Close()
            bAns = True
        Catch Ex As Exception
            ErrInfo = Ex.Message

        End Try
        Return bAns
    End Function
    Friend Shared Function AppendTextToFile(ByVal FullPath As String, ByRef strData As String, _
                                  Optional ByVal ErrInfo As String = "") As Boolean
        Dim bAns As Boolean = False
        Dim objReader As StreamWriter
        Try
            Dim s As String = String.Empty
            If File.Exists(FullPath) Then
                s = GetFileContents(FullPath)
                '--make sure all new data gets appedned on a "new' line.
                If Not s.EndsWith(vbCrLf) Then s = s & vbCrLf
            End If
            objReader = New StreamWriter(FullPath)
            objReader.Write(s & strData)
            objReader.Close()
            bAns = True
        Catch Ex As Exception
            ErrInfo = Ex.Message

        End Try
        Return bAns
    End Function
#End Region
End Class
